import axios from 'axios'
// http://127.0.0.1:4523/m1/7159655-6883718-default
// http://pcapi-xiaotuxian-front-devtest.itheima.net
const httpInstance = axios.create({
  baseURL: 'http://pcapi-xiaotuxian-front-devtest.itheima.net',
  timeout: 5000
})

httpInstance.interceptors.request.use(config => {
  return config
}, e => Promise.reject(e))

httpInstance.interceptors.response.use(res => res.data, e => {
  return Promise.reject(e)
})

export default httpInstance
